﻿<%@ page language="java" import="java.util.*"
	contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib uri="http://www.rapid-framework.org.cn/rapid" prefix="rapid"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt"%>
<rapid:override name="frame-header-style">
<style>
    /*覆盖 layui*/
    .layui-input-block {
        margin:0px 10px;
    }
    .layui-table {
        margin-top: 0;
    }
    .layui-col-md4 {
        padding:10px;
    }
    .layui-col-md8 {
        padding:10px;
    }
    .layui-btn {
        margin: 2px 0!important;
    }
</style>
</rapid:override>

<rapid:override name="frame-content">
		<!-- 内容主体区域 -->
		<blockquote class="layui-elem-quote">
			<span class="layui-breadcrumb" lay-separator="/"> <a
				href="/admin">首页</a> <a href="/admin/category">分类列表</a> <a><cite>修改分类</cite></a>
			</span>
		</blockquote>


		<div class="layui-row">
			<div class="layui-col-md4">
				<form class="layui-form" method="post" id="myForm" action="category/edit">
				<input type = "hidden" name = "categoryId" value = "${category.categoryId}">
					<div class="layui-form-item">
						<div class="layui-input-block">
							<strong>修改分类</strong>
						</div>
						<div class="layui-input-block">名称 <span style="color: #FF5722;">*</span> 
							<input type="text" id="categoryName" name="categoryName" placeholder="请输入分类名称" autocomplete="off" class="layui-input" value="${category.categoryName} " required>
						</div> 
						<br>
						<div class="layui-input-block">父节点 <span style="color: #FF5722;">*</span> 
						
							<select name="categoryPid" class="layui-input" required>
								<option value="0" <c:if test="${category.categoryPid==0 }">selected</c:if>>无</option>
								<option value="1" <c:if test="${category.categoryPid==1 }">selected</c:if>>Java</option>
								<option value="10" <c:if test="${category.categoryPid==10 }">selected</c:if>>计算机科学</option>
								<option value="15" <c:if test="${category.categoryPid==15 }">selected</c:if>>其他技术</option>
							</select>
						</div>
						<br>
						<div class="layui-input-block">分类描述 
							<input type="text" name="categoryDescription" placeholder="请输入分类描述" autocomplete="off" class="layui-input" value="${category.categoryDescription}">
						</div>
						<br>
						<div class="layui-input-block">
							图标样式 <input type="text" name="categoryIcon"
								placeholder="请输入图标样式,如 fa fa-coffee" autocomplete="off"
								class="layui-input">
						</div>
						<br>
						<div class="layui-input-block">
							<button class="layui-btn" lay-filter="formDemo" type="submit">添加</button>
						</div>
					</div>
				</form>
			</div>
		
			
		</div>

</rapid:override>
<%@ include file="../framework.jsp"%>